.message-wrapper {
  display: flex;
  flex-direction: row;
  margin: 0.5rem 0rem 0.5rem 1rem;
}
.message-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  word-break: break-all;
}

.message {
  flex: 1;
  --radius: 0.5rem;
  margin: 0rem 1rem 0rem 0.5rem;
  position: relative;
  border-radius: var(--radius);
  grid-column: span 6 / -1;
  // padding: 1rem 1.5rem;
  animation: fade-in 0.3s ease-out forwards;
  background: #f2f2f2;
  padding: 0.5rem 1rem;
}
.message_ai {
  // border-top-left-radius: 0;
}
.message_user {
  background: transparent;
  padding: 0;
  font-weight: bold;
}
// ! 左侧样式: 丢弃
// .message_user {
//   background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
//   border-bottom-right-radius: 0;
//   color: #fff;
// }
// .message_user:after {
//   content: "";
//   background: #bc52ee;
//   right: calc(var(--size) * -1);
//   border-bottom-right-radius: 8rem;
//   background: radial-gradient(
//     circle at top right,
//     rgba(0, 0, 0, 0) 0,
//     rgba(0, 0, 0, 0) var(--size),
//     #bc52ee var(--size)
//   );
//   --size: 1rem;
//   content: "";
//   position: absolute;
//   bottom: 0;
//   height: var(--size);
//   width: var(--size);
//   z-index: 2;
// }

.message_input {
  animation: 0.6s van-cursor-flicker infinite;
}

.message_copy {
  position: absolute;
  display: flex;
  right: 10px;
  color: #1677ff;
  cursor: pointer;
}

.answer-actions {
  --radius: 0.5rem;
  margin: 0.5rem 1rem 0.5rem 0.5rem;
  position: relative;
  border-radius: var(--radius);
  grid-column: span 6 / -1;
  animation: fade-in 0.3s ease-out forwards;
  background: #f2f2f2;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  .answer-actions-item {
    display: flex;
    flex-direction: row;
    &:not(:last-child) {
      margin-bottom: 10px;
    }
    .answer-actions-item-c {
      flex: 1;
      overflow: hidden;
      padding-left: 8px;
    }
  }
}

// ! 生成回答时候默认插入显示的动效
.chat-answer-load {
  position: relative;
  display: inline-block;

  &::after {
    content: "|";
    animation: blink-animation 1s steps(2, start) infinite;
    position: absolute;
    top: 0;
    right: -1px;
  }

  @keyframes blink-animation {
    to {
      visibility: hidden;
    }
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes van-cursor-flicker {
  from {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
